<?php
#
# DEFAULT CONFIG
#
$CONFIG['session.secure'] = false;

#
# ACTIONS
#
function action_default($p) {
	global $PARAMS;
	global $CONFIG;

	if (!isset($p[0])) {
		$page = $PARAMS[0] = 'home';
	} else if (page_exists($p[0])) {
		$page = $p[0];
	} else {
		$page = $PARAMS[0] = 'notfnd';
	}

	if (isset($PARAMS['_output'])) {
		$output = $PARAMS['_output'];
	} else {
		$output = 'full';
	}

	if ($output != 'partial') {
		render('header');
	}

	page($page);

	if ($output != 'partial') {
		render('footer');
	}
}
